<template>
	<view class="apps">
		<view class="banner" v-if="info.image !='//wework.sdlycwzx.com/static/images/xxcy1.png'">
			<image :src="info.image" style="width: 100%;height: auto;" mode="widthFix"></image>
		</view>
		<view  class="flex fdc mtb20 ptb20 plr20 bgwhite">
			<view class="flex aic f32 black">
				<text>{{info.title}}</text>
			</view>
			<view class="flex aic f26 c666 pt20">
				<text>{{ timeFormat(info.create_time) }}</text>
			</view>
		</view>
		<view class="flex ptb20 bgwhite  plr20 fdc">
			<view class="ptb20 f32 fweight6">公告详情</view>
			<view class="pb20 plr20" v-if="info.images.length > 0">
				<view class="banner" v-for="(item ,index) in info.images">
					<image :src="item" style="width: 100%;height: auto;" mode="widthFix"></image>
				</view>
			</view>
			<uv-parse :content="info.content" :tagStyle="style"></uv-parse>
		</view>
	</view>
</template>
<script setup>
	import { util } from '/common/util.js';
	import { ref , reactive,nextTick  } from 'vue';
	import { onLoad,onShow,onReachBottom } from '@dcloudio/uni-app'
	import { timeFormat } from '@/uni_modules/uv-ui-tools/libs/function/index.js'
	const info = ref([]),id = ref(0),style=ref({p:"font-size:15px;",img:"max-width:100%"})
	const getInfo = ()=>{
		util.request({url:"/notice/detail",data:{id:id.value},type:'get'}).then((rlt)=>{
			info.value = rlt.data;
		})
	}
	onLoad((opt)=>{
		id.value = opt.id
		getInfo();
	})
</script>

<style scoped>
	.banner{width:100%;overflow: hidden;}
</style>